/*
 * Copyright 2010 - 2011, The PLDesktop Development Team
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License as published by the Free Software Foundation; either
 *  version 2.1 of the License, or (at your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public
 *  License along with this library; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *
 */

#ifndef MODULEINFO_H
#define MODULEINFO_H

#include <pltypes.h>
using namespace std;

/**
 * Hold information about a module.
 */
class ModuleInfo {
public:
    /**
     * Constructor.
     *
     * @param modStart Start address from the module.
     * @param modEnd End address from the module.
     * @param commandLine The commandline from the module.
     */
    ModuleInfo(uint32_t modStart, uint32_t modEnd, char *commandLine);
    /**
     * Get the startaddress from the module.
     *
     * @return The startaddress.
     */
    inline uint32_t moduleStart() const;
    /**
     * Get the endaddress from the module.
     *
     * @return The endaddress.
     */
    inline uint32_t moduleEnd() const;
    /**
     * Get the commandline from the module.
     *
     * @return The commandline as string.
     */
    inline const char *moduleCommandLine() const;
private:
    uint32_t m_modStart;
    uint32_t m_modEnd;
    char *m_commandLine;
};

uint32_t ModuleInfo::moduleStart() const {
    return m_modStart;
}

uint32_t ModuleInfo::moduleEnd() const {
    return m_modEnd;
}

const char *ModuleInfo::moduleCommandLine() const {
    return m_commandLine;
}

#endif
